script/execute: Limit the recursion depth
authorB Horn <b@horn.uk>
Thu, 18 Apr 2024 18:04:13 +0000 (19:04 +0100)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commit5ac019da929fdb86f5ac5b3b0dfae30b86a5a1ae
tree8828bcc03060b031304f0a167aa4a560c164f8a4
parent0e4062665d3937f660b0cd53f977bae86cfe254b
script/execute: Limit the recursion depth

If unbounded recursion is allowed it becomes possible to collide the
stack with the heap. As UEFI firmware often lacks guard pages this
becomes an exploitable issue as it is possible in some cases to do
a controlled overwrite of a section of this heap region with
arbitrary data.

Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name script-execute-Limit-the-recursion-depth.patch
grub-core/script/execute.c